home *** CD-ROM | disk | FTP | other *** search
/ BCI NET 2 / BCI NET 2.iso / archives / programming / source / tracker-4.13.lha / tracker / Makefile < prev    next >
Encoding:
Makefile  |  1995-02-15  |  6.6 KB  |  253 lines

  1. # Makefile for any machine
  2. # - based on my newer makefile and the GREATE
  3. # modifications by Mike Battersby
  4. ###############################################################################
  5. #
  6. # CONFIGURATION OPTIONS
  7. #
  8.  
  9. # Choose your machine type. Possible types as of this version (4.11)
  10. # are
  11. #  hpalib, hplow, hp3, dec, solaris, sparc, linux, freebsd, sgi, 
  12. #  soundblaster, aix, next.
  13. # gmake needed to handle this file in FreeBSD and NeXTStep
  14. MACHINE = sparc
  15.  
  16. # The name of your C compiler. For most machines this will be
  17. # either 'cc' or 'gcc'.
  18. CC = acc
  19.  
  20. OPTS=-c
  21.  
  22. # User interface type. Right now, this is Unix as there are no alternatives.
  23. UI = Unix/./
  24.  
  25. PREFIX=/users/algo/espie/pub
  26. # Destination directory for tracker binaries and manpage.
  27. #
  28. # If you don't wish to use the 'make install' and 'make install.man'
  29. # commands, you can ignore these.
  30. BIN_DIR = $(PREFIX)/bin
  31. MAN_DIR = $(PREFIX)/man
  32.  
  33. # Where to put the compression methods description
  34. COMPRESSION_FILE=$(PREFIX)/lib/compression_methods
  35.  
  36. # How to install the binaries and manpage. If you have a unix system,
  37. # use the GNU install program if you have it, otherwise try 'cp'. For
  38. # non-unix systems, make this the command for copying a file with the
  39. # following syntax
  40. #  <program_name> <source_name> <destination_name>
  41. #
  42. # If you don't wish to use the 'make install' and 'make install.man'
  43. # commands, you can ignore this.
  44. INSTALL = install
  45.  
  46. # Permissions and user/group id's to install with. Non-unix users
  47. # should comment these out (alternatively, you can use these to
  48. # provide arguments for the above $(INSTALL) program). If you want
  49. # to install tracker setuid root (which will allow it to renice
  50. # itself when non-root users run it), change the "-m 755" below to
  51. # "-m 4755". If you do so, you must be root to run make install.
  52. #
  53. # If you don't wish to use the 'make install' and 'make install.man'
  54. # commands, you can ignore these.
  55. INST_BIN_OPT = -c -s -m 755 -o root -g root
  56. INST_MAN_OPT = -c -m 644 -o root -g root
  57. ###############################################################################
  58. #
  59. # C compiler flags and libraries for each machine.
  60. # Unless you are porting this to a new architecture, you shouldn't
  61. # need to change these (on the other hand, if you understand what you
  62. # are doing, go ahead!).
  63. #
  64.  
  65. CFLAGS_next = -O3 -fomit-frame-pointer -funroll-loops -ffast-math -Wall
  66. LIBS_next   =
  67. AUDIODIR_next = NeXT/
  68. CONFIG_next = NeXT/
  69.  
  70. CFLAGS_hpalib = +O3 +OS +ESlit
  71. LIBS_hpalib   = -lAt -lAlib -lm
  72. AUDIODIR_hpalib=Hpux/
  73. AUDIONAME_hpalib=alib_
  74. CONFIG_hpalib = Hpux/
  75.  
  76. CFLAGS_hplow = -Ae +O3 -Wl, -a,archive -s
  77. LIBS_hplow=-lM
  78. AUDIODIR_hplow=Hpux/
  79. AUDIONAME_hplow=low_
  80. CONFIG_hplow = Hpux/
  81.  
  82. # yet another port to hp! This one might be the best yet.
  83. CFLAGS_hp3 = +O3 +OS +ESlit
  84. LIBS_hp3   = -lAt -lAlib -lm
  85. AUDIODIR_hp3=Hpux/
  86. AUDIONAME_hp3=3_
  87. CONFIG_hp3 = Hpux/3_
  88.  
  89. CFLAGS_solaris = -O
  90. LIBS_solaris   = -lm
  91. AUDIODIR_solaris=Sparc/ 
  92. CONFIG_solaris = Sparc/solaris_
  93.  
  94.  
  95. #CFLAGS_sparc = -g
  96. CFLAGS_sparc = -O4 -Bstatic
  97. #CFLAGS_sparc = -O2 -finline-functions -funroll-loops -Wall
  98. LIBS_sparc   = -lm
  99. AUDIODIR_sparc=Sparc/
  100. CONFIG_sparc = Sparc/
  101.  
  102. CFLAGS_dec = -O 
  103. LIBS_dec   = -lm -lAF
  104. AUDIODIR_dec=AF/
  105. CONFIG_dec = AF/dec_
  106.  
  107. CFLAGS_sgi = -j -O 
  108. LIBS_sgi   = -laudio -lm
  109. AUDIODIR_sgi=Sgi/
  110. CONFIG_sgi = Sgi/
  111.  
  112. CFLAGS_soundblaster = -O
  113. LIBS_soundblaster   = -lm
  114. AUDIODIR_soundblaster=Soundblaster/
  115. CONFIG_soundblaster = Soundblaster/
  116.  
  117. CFLAGS_linux = -N -O2 -funroll-loops
  118. LIBS_linux   = -lm
  119. AUDIODIR_linux=PCux/
  120. CONFIG_linux = PCux/linux_
  121.  
  122. CFLAGS_freebsd = -O2 -Dstricmp=strcasecmp
  123. LIBS_freebsd = -lm
  124. AUDIODIR_freebsd=PCux/
  125. CONFIG_freebsd = PCux/freebsd_
  126.  
  127. CFLAGS_aix = -O
  128. LIBS_aix = -lm
  129. AUDIODIR_aix = Aix/
  130. CONFIG_aix = Aix/
  131.  
  132. CFLAGS = $(CFLAGS_${MACHINE})
  133. COPTS = $(OPTS) $(CFLAGS)
  134. LIBS = $(LIBS_${MACHINE})
  135. CONFIG = Arch/$(CONFIG_${MACHINE})
  136. AUDIODIR = Arch/$(AUDIODIR_${MACHINE})
  137. AUDIONAME = $(AUDIONAME_${MACHINE})
  138. AUDIO = $(AUDIODIR)$(AUDIONAME)
  139.  
  140. OBJ_TRACKER = main.o $(AUDIO)audio.o st_read.o commands.o \
  141. resample.o automaton.o st_play.o getopt.o open.o tools.o \
  142. dump_song.o setup_audio.o notes.o display.o empty.o \
  143. $(UI)ui.o prefs.o tags.o autoinit.o
  144.  
  145. OBJ_ANALYZER = analyzer.o st_read.o open.o dump_song.o tools.o notes.o \
  146. prefs.o autoinit.o ${UI}ui.o display.o empty.o
  147.  
  148. OBJ_SPLITMOD = split.o tools.o st_read.o dump_song.o open.o notes.o \
  149. display.o prefs.o autoinit.o $(UI)ui.o empty.o
  150.  
  151. all:    config.h tracker randomize analyzer splitmod
  152.  
  153. config.h:
  154.     cp $(CONFIG)config.h config.h
  155.  
  156. install: 
  157.     $(INSTALL) $(INST_BIN_OPT) tracker $(BIN_DIR)
  158.     $(INSTALL) $(INST_BIN_OPT) randomize $(BIN_DIR)
  159.     $(INSTALL) $(INST_BIN_OPT) analyzer $(BIN_DIR)
  160.     $(INSTALL) $(INST_BIN_OPT) splitmod $(BIN_DIR)
  161.     [ -f ${COMPRESSION_FILE} ] || \
  162.         $(INSTALL) $(INST_MAN_OPT) compression_methods ${COMPRESSION_FILE}
  163.  
  164. install.man:
  165.     $(INSTALL) $(INST_MAN_OPT) man/tracker.1 $(MAN_DIR)/man1/tracker.1
  166.  
  167.  
  168.  
  169. devel: 
  170.     -rm -f $(BIN_DIR)/dtracker #$(BIN_DIR)/splitmod
  171.     cp tracker $(BIN_DIR)/dtracker
  172. #-    cp splitmod $(BIN_DIR)/splitmod
  173.  
  174. tracker: ${OBJ_TRACKER}
  175.     ${CC} -o tracker ${CFLAGS} ${OBJ_TRACKER} ${LIBS}
  176.  
  177. dtracker: ${OBJ_TRACKER}
  178.     ${CC} -o dtracker ${CFLAGS} ${OBJ_TRACKER} ${LIBS}
  179.  
  180. analyzer: ${OBJ_ANALYZER}
  181.     $(CC) -o analyzer ${CFLAGS} ${OBJ_ANALYZER} ${LIBS}
  182.  
  183. randomize: randomize.c
  184.     $(CC) -o randomize ${CFLAGS} randomize.c 
  185.  
  186. splitmod: ${OBJ_SPLITMOD}
  187.     $(CC) -o splitmod ${CFLAGS} ${OBJ_SPLITMOD} ${LIBS}
  188.  
  189. main.o: main.c song.h version.h
  190.     $(CC) ${COPTS} main.c
  191.  
  192. tools.o: main.c 
  193.     $(CC) ${COPTS} tools.c
  194.  
  195. $(AUDIO)audio.o: $(AUDIO)audio.c 
  196.     cd $(AUDIODIR); $(CC) -I../.. ${COPTS} $(AUDIONAME)audio.c
  197.  
  198. $(UI)ui.o: $(UI)ui.c
  199.     cd $(UI); $(CC) -I.. ${COPTS} ui.c
  200.  
  201. split.o: split.c
  202.     $(CC) ${COPTS} split.c
  203.  
  204. open.o: open.c Makefile
  205.     $(CC) ${COPTS} -DCOMPRESSION_FILE=\"${COMPRESSION_FILE}\" open.c
  206.  
  207. audio.o: audio.c
  208.     $(CC) ${COPTS} audio.c
  209.  
  210. automaton.o: automaton.c song.h channel.h
  211.     $(CC) ${COPTS} automaton.c
  212.  
  213. getopt.o: getopt.c getopt.h
  214.     $(CC) ${COPTS} getopt.c
  215.  
  216. player.o: player.c song.h channel.h
  217.     $(CC) ${COPTS} player.c
  218.  
  219. st_read.o: st_read.c song.h
  220.     $(CC) ${COPTS} st_read.c
  221.  
  222. commands.o: commands.c channel.h song.h
  223.     $(CC) ${COPTS} commands.c
  224.  
  225. dump_song.o: dump_song.c
  226.     $(CC) $(COPTS) dump_song.c
  227. analyzer.o: analyzer.c
  228.     $(CC) $(COPTS) analyzer.c
  229. setup_audio.o: setup_audio.c
  230.     $(CC) $(COPTS) setup_audio.c
  231. notes.o: notes.c
  232.     $(CC) $(COPTS) notes.c
  233.  
  234. display.o: display.c
  235.     $(CC) $(COPTS) display.c
  236.  
  237.  
  238. clean:
  239.     -rm $(OBJ_TRACKER) $(OBJ_ANALYZER) $(OBJ_SPLITMOD) randomize.o
  240.     -rm tracker randomize splitmod analyzer core 
  241.     -rm tracker.tar tracker.tar.Z tracker.lzh
  242.     -rm config.h
  243.  
  244. export:
  245.     -rm tracker.tar.Z
  246.     cd ..; tar -cvof tracker/tracker.tar -I tracker/arc.list
  247.     -mkdir tmp
  248.     cd tmp; tar xvf ../tracker.tar
  249.     cd tmp; lha a ../tracker.lzh tracker
  250.     rm -rf tmp;
  251.     compress tracker.tar
  252.  
  253.